package com.echat.messagesender.sender.model;

import com.echat.messagesender.sender.constant.Constants;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import java.time.LocalDateTime;

/**
 * Created by chenmohan on 2018/10/08
 *
 * @description
 */
@Data
public class Platform {

    @Id
    private Long id;

    private String platformName;

    private Integer type;

    private Integer status;

    private String memo;

    @Column(name="create_datetime")
    private LocalDateTime createTime;

    @Column(name="modify_datetime")
    private LocalDateTime modifyTime;

    /**
     * 判断平台是否可用
     * @return
     */
    public boolean isOnUse(){
        return status != Constants.DO_IS_OK;
    }
}
